/*
 * @Author: Jiraiya
 * @Date: 2020-04-07 18:54:27
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-04-07 19:36:48
 * @Description: 
 */
 class Base{
    constructor(list){
        this.list = list;
    }

    render(state){
        let el = this.list.find(ele => ele.path === state);
        // 处理404页面
        el = el ? el : this.list.find(ele => ele.path === '*');
        return el.component;
    }
}

export default Base;